package com.evildog.workspace.life.application.model;

import cn.hutool.core.date.DatePattern;
import com.evildog.workspace.dependencies.mybatis.annotation.QueryCondition;
import com.evildog.workspace.dependencies.mybatis.annotation.QueryTableLogic;
import com.evildog.workspace.dependencies.mybatis.annotation.QueryUserCondition;
import com.evildog.workspace.dependencies.mybatis.enums.ComparisonOperatorsEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * <p>
 * diary分页查询参数，可以使用QueryCondition.class
 * </p>
 *
 * @author evildog
 * @since 2020-08-02
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "Diary查询参数")
@QueryUserCondition
@QueryTableLogic
public class DiaryPageParam implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "标题（系统生成）")
    @QueryCondition(operator = ComparisonOperatorsEnum.LE)
    private String title;


    @ApiModelProperty(value = "开始时间")
    @QueryCondition( fieldName = "date", operator = ComparisonOperatorsEnum.GE)
    private LocalDate startTime;

    @ApiModelProperty(value = "结束时间")
    @QueryCondition(fieldName = "date", operator = ComparisonOperatorsEnum.LE)
    private LocalDate endTime;


}
